package com.xiaoge.environment;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import java.util.Arrays;

/**
 * TODO
 *
 * @author <a href="mailto:1330137071@qq.com">Zhang Xiao</a>
 * @since
 */
@Component
public class TestEnvironment {

	@Autowired
	private ConfigurableEnvironment environment;

	public void test() {
		// 系统
		System.out.println(environment.getSystemProperties());
		// jvm
		System.out.println(environment.getSystemEnvironment());
		// 属性
		System.out.println(environment.getPropertySources());
	}

}
